<template>
  <van-swipe-cell class="kuang">
    <router-link to="/xiangq" @click.native="indexid(id)">
      <div class="lf">
      <h3>{{title}}</h3>
      <p class="gray">{{title}}</p>
      <span><van-icon name="eye" />收藏({{click}})</span> &nbsp;
      <span><van-icon name="good-job" />点赞({{lovenum}})</span>
    </div>
    <div class="ri">
      <img :src="'http://124.223.14.236:8060/'+ pic" alt="" />
    </div>
    </router-link>
  </van-swipe-cell>
</template>

<script>
export default {
  props:['title','pic','lovenum','click','id'],
  methods:{
       indexid(idx){
      //  console.log(idx);
       localStorage.setItem('ids',idx)
     window.location.reload();
  },
  }
};
</script>

<style scoped>
.kuang {
  margin-top: 15px;
  margin-bottom: 15px;
  height: 130px;
  overflow: hidden;
}
span {
  font-size: 14px;
  color: rgb(182, 182, 182);
}
.lf {
  float: left;
  width: 50%;
  margin-left: 16px;
}
.gray {
  margin-top: 10px;
  color: gray;
}
.ri {
  float: right;
  width: 40%;
}
.ri img {
  width: 100%;
  height: 100%;
}
h3{
  width: 200px;
  height: 25px;
  overflow: hidden;
}
</style>